﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="PrintListPart" List="113" Url="_catalogs/wp">
    <File Url="PrintListPart.webpart" Type="GhostableInLibrary">
      <Property Name="Group" Value="Print List" />
    </File>
  </Module>
  <Module Name="MasterPage" Url="_catalogs/masterpage">
    <File Url="print.master" Type="GhostableInLibrary"/>
  </Module>
  <Module Name="PrintPage" Url="PrintList">
    <File Url="PrintList.aspx"  Type="Ghostable">
      <AllUsersWebPart WebPartZoneID="Center" WebPartOrder="0">
        <![CDATA[ 
                     <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
                      <Assembly>PrintList, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ac5dbc62f6de3a03</Assembly>
                      <TypeName>PrintList.PrintListPart</TypeName>
                      <Title>Print List Web Part</Title>
                      <Description>Print List Web Part</Description>
                      <FrameType>None</FrameType>
                      <IsVisible>true</IsVisible>
                      </WebPart>
        ]]>
      </AllUsersWebPart>
    </File>
  </Module>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="107"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open('http://contososerver/PrintList/PrintList.aspx?site=' + site + '&amp;list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="100"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open('http://contososerver/PrintList/PrintList.aspx?site=' + site + '&amp;list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="103"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open('http://contososerver/PrintList/PrintList.aspx?site=' + site + '&amp;list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="104"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open('http://contososerver/PrintList/PrintList.aspx?site=' + site + '&amp;list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="105"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open('http://contososerver/PrintList/PrintList.aspx?site=' + site + '&amp;list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>
